package com.directv.z8training.EMS.DAO;

import java.util.List;

import com.directv.z8training.EMS.Entity.Project;
import com.directv.z8training.EMS.Entity.ProjectUser;
import com.directv.z8training.EMS.Entity.User;

/**
 * @author DungTQ9
 *
 */
public interface UserDAO {

	/**
	 * @param name
	 * @param password
	 * @return
	 */
	User checkLogin(String username, String password);

	/**
	 * @param user
	 */
	void createPM(String username, String password, String fullname,
			String address, String phone, String code);

	/**
	 * @param user
	 */
	void createDEV(String username, String password, String fullname,
			String address, String phone, String projectcode);

	/**
	 * @param username
	 * @param fullname
	 * @param address
	 * @param phone
	 */
	void updateInformation(User user,String fullname, String address, String phone);

	/**
	 * @param user
	 */
	void changePassword(User user, String password);

	/**
	 * @param username
	 * @param projectCode
	 */
	void removeDEV(String username, String projectCode);

	/**
	 * @param username
	 * @return
	 */
	User findUser1(String username);

	/**
	 * @param username
	 * @return
	 */
	User findUserByUserName(String username);

	/**
	 * @param user
	 * @return
	 */
	List<ProjectUser> findListProjectUserByUsername(User user);

	/**
	 * @param code
	 * @return
	 */
	Project findProjectUserByCode(String code);

	/**
	 * @return
	 */
	List<User> findAllUser();

	/**
	 * @return
	 */
	List<User> findListUnprojectUser();

	/**
	 * @param username
	 * @param projectCode
	 */
	void assignDEVToProject(String username, String projectCode);

	/**
	 * @param username
	 * @return
	 */
	boolean checkAvailable(String username);
}
